%h1 Comments
%div.gallery_comments
  - @comments.each do |comment|
    %div.comment_container
      %div.creation_information
        %div.user_login
          %a{:href => user_url(comment.user)}= comment.user.login
        %div.comment_time
          = comment.created_at.strftime("%m/%d/%y at %I:%M %p")
        - if logged_in? && current_user.is_admin?
          %div.delete_comment
            - form_for comment, :html => {:method => :delete} do |form|
              = submit_tag "delete"
      %div.user_comment
        = comment.text
        - if comment.for_photo?
          %div.comment_photo
            %a{:href => photo_url(comment.photo)}
              %img.photo_thumb{:src => comment.photo.public_filename(:thumb), :title => (comment.photo.caption ? comment.photo.caption : comment.photo.filename), :alt => (comment.photo.caption ? comment.photo.caption : comment.photo.filename)}
        - if comment.for_video?
          %div.comment_video
            %a{:href => video_url(comment.video)}
              %img.video_thumb{:src => comment.video.thumbnail, :title => (comment.video.caption ? comment.video.caption : comment.video.filename), :alt => (comment.video.caption ? comment.video.caption : comment.video.filename)}
    %div.clear_fix